#include<iostream>
#include<string>
#include <stdio.h>
using namespace std;

int main() 
{
	double a1, a2;
	char b;
	cout << "请输入您想要计算的算式（如1+3）:" << endl;
	cin >> a1;
	cin >> b;
	while (b != '-' && b != '+' && b != '*' && b != '/') 
	{
		cout << "发现非法符号，请检查是否输入正确的运算符！" << endl;
		return 0;
	}
	cin >> a2;
	while (b == '/' && a2 == 0) 
	{
		printf("除数不能为0，请重新输入！");
		return 0;
	}
	if (b == '+') 
	{
		printf("%.2f\n", a1 + a2);
	}
	else if (b == '-') 
	{
		printf("%.2f\n", a1 - a2);
	}
	else if (b == '*')
	{
		printf("%.2f\n", a1 * a2);
	}
	else if (b == '/') 
	{
		printf("%.2f\n", a1 / a2);
	}
	return 0;
}